package com.right.filter;

import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;

/**
 * Servlet Filter implementation class Myfilter
 */
@WebFilter("/*")
public class Myfilter implements Filter {

    /**
     * Default constructor. 
     */
    public Myfilter() {
        // TODO Auto-generated constructor stub
    }



	/**
	 * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain)
	 */
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
		// TODO Auto-generated method stub
		// place your code here
		//通用代码
		request.setCharacterEncoding("utf-8");
		// 放行代码段
		chain.doFilter(request, response);
	}



}
